#include <bits/stdc++.h>
using namespace std;
int n,m;
int a[100010],c[100010];
int k,r,g;
int t;
int x[5];
int main()
{
    freopen("arena","r",stdin);
    freopen("arena","w",stdout);
    cin>>n>>m;
    for(int i=1;i<=n;i++){
        cin>>a[i];
    }
    for(int i=1;i<=m;i++){
        cin>>c[i];
    }
    cin>>k>>r>>g;
    cin>>t;
    for(int i=1;i<=4;i++){
        cin>>x[i];
    }
    cout<<1;
    fclose(stdin);
    fclose(stdout);
    return 0;
}
